package com.sdonkey.score.service;


import com.sdonkey.score.bean.LoginReturnBean;
import com.sdonkey.score.exception.BusinessException;
import com.sdonkey.score.model.AdvertiserBankBean;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

public interface IAccountCentralService {
	
	
	
	/**
	 * 查找邮箱和检验码
	 * @param email
	 * @param verCode
	 * @return
	 */
//	public int checkVerificationCode(String email, String verCode) ;
	
    /**
     * 查找邮箱
     * @param email
     * @return
     */
	public boolean existsEmail(String email);

	/**
	 * 更改广告主基本信息
	 * @param loginReturnBean
	 * @return
	 */
//	public int updateBasicInfo(LoginReturnBean loginReturnBean);
	

//	public String getTotalConsumption(String attribute);
	
	/**
	 * 校验邮箱和验证码
	 * @param newEmail
	 * @param verCode
	 * @return
	 */
//	public int checkNewEmail(String newEmail, String verCode);
    
	/**
	 * 提现  修改提现金额字段
	 * @param advId
	 * @param money
	 * @return
	 */
//	public int insertDrawCash(String advId, String money);
	/**
	 * 提现  修改账户余额
	 * @param advId
	 * @param money
	 * @param actualBalance
	 * @return
	 */
	public int updateActualBalance(String advId, String money, String actualBalance);
	
	/**
	 * 更改信息
	 * @param map
	 * @return
	 */
	public int updateStatus(Map<String, String> map);

	/**
	 * 更改充值金额
	 * @param advId
	 * @param money
	 * @param actualBalance
	 * @param totalConsumption
	 * @return
	 * @throws BusinessException
	 */
	public int updateBalance(String advId, String money, String actualBalance, String totalConsumption) throws BusinessException;
	
	
	public int newPassword(String email, String newPassword) throws BusinessException;

	
	
  /**
   * 更改邮箱
   * @param advId
   * @param email
   * @return
   */
	public int alterEmail(String advId, String email) ;
	
	
	public int saveCredit(String advId, String credit, String days) throws BusinessException;
	
	
	public boolean existsCredit(String advId) throws BusinessException;
	public void sendValidateCode(String email) throws Exception;

	/**
	 * 设置微积分支付密码
	 * @param advId
	 * @param payPwd
	 * @return
	 */
	public int setPayPassword(String advId, String payPwd);

	/**
	 * 保存用户绑定的银行卡信息
	 * @param advertiserBankBean
	 * @return
	 */
	public int saveBankInfo(AdvertiserBankBean advertiserBankBean);

	/**
	 * 保存手机验证码
	 * @param advId
	 * @param bankPhone
	 * @param verCode
	 * @return
	 */
	public int insertPhoneCode(String advId, String bankPhone, String verCode);

	/**
	 * 判断手机验证码正确性
	 * @param advId
	 * @param bankPhone
	 * @param phoneCode
	 * @return
	 */
	public int checkPhoneCode(String advId, String bankPhone, String phoneCode);

	/**
	 * 获取银行卡信息
	 * @param advId
	 * @return
	 */
	public List<AdvertiserBankBean> getBankInfo(String advId);

	/**
	 * 累计总支出
	 * @param advId
	 * @return
	 */
	public String totalSpending(String advId);

	/**
	 * 获取当前广告余额
	 * @param advId
	 * @return
	 */
	public double getAdvertiserBalance(String advId);

	/**
	 * 修改后的会员昵称去重
	 * @param memberName
	 * @return
	 */
	public int checkName(String memberName);

	/**
	 * 向邮箱发送验证码
	 * @param session
	 * @param email
	 */
	public void sendEmailVerCode(HttpSession session, String email);

	/**
	 * 保存充值金额
	 * @param advId
	 * @param money
	 */
	public void saveRecharge(String advId, String money);

	/**
	 * 公司名唯一性校验
	 * @param companyName
	 * @return
     */
	public int companyName(String companyName);



}
